package com.example.demo.factory.factory03;

/**
 * @Description
 * @Author youxin
 * @Version V1.0.0
 * @Since 1.0
 * @Date 2021/12/23
 */
public class SimpleFactory {
    public Pizza createPizza(String orderType){
        Pizza pizza=null;
        if(orderType.equals("chinese")) {
            pizza= new ChinesePizza();
        }
        if(orderType.equals("england")){
            pizza= new EnglandPizza();
        }
        return pizza;
    }
}
